class PlatInfoModel {
  String msg;
  num resCode;
  List<PlatInfoData> resObj;
  PlatInfoModel({
    this.msg,
    this.resCode,
    this.resObj
  });

  PlatInfoModel.fromJson(Map < String, dynamic > json){
        msg=json['msg'];
        resCode=json['resCode'];
        resObj=(json['resObj'] as List)?.map((l)=>PlatInfoData.fromJson(l))?.toList();
  }
  Map <String, dynamic> toJson() => {
    'msg':msg,
    'resCode':resCode,
    'resObj':resObj?.map((it)=>it.toJson())?.toList()
  };
}

class PlatInfoData {
  static PlatInfoData defaultAll(){
    PlatInfoData allPlatData = PlatInfoData();
    allPlatData.logo = 'images/all_detail.png';
    allPlatData.key = '全部';
    return allPlatData;
  }
  String logo;
  String key;
  PlatInfoData({
    this.logo,
    this.key
  });

  PlatInfoData.fromJson(Map < String, dynamic > json):
        logo=json['logo'],
        key=json['key'];
  Map <String, dynamic> toJson() => {
    'logo':logo,
    'key':key
  };
}

class SinglePlatDetailModel {
  String msg;
  num resCode;
  SinglePlatDetailData resObj;
  SinglePlatDetailModel({
    this.msg,
    this.resCode,
    this.resObj
  });

  SinglePlatDetailModel.fromJson(Map < String, dynamic > json){
    print(json);
        msg=json['msg'];
        resCode=json['resCode'];
        resObj=SinglePlatDetailData.fromJson(json['resObj']);
        print(resObj);
  }
  Map <String, dynamic> toJson() => {
    'msg':msg,
    'resCode':resCode,
    'resObj':resObj?.toJson()
  };
}

class SinglePlatDetailData {
  DetailDataEntity currentData;
  DetailDataEntity lastWeekData;
  DetailDataEntity yesterDayData;
  DetailDataEntity lastMonthData;
  SinglePlatDetailData({
    this.currentData,
    this.lastWeekData,
    this.yesterDayData,
    this.lastMonthData
  });

  SinglePlatDetailData.fromJson(Map < String, dynamic > json):
    currentData=DetailDataEntity.fromJson(json['currentData']),
    yesterDayData=DetailDataEntity.fromJson(json['yesterDayData']),
    lastWeekData=DetailDataEntity.fromJson(json['lastWeekData']),
    lastMonthData=DetailDataEntity.fromJson(json['lastMonthData']);

  Map <String, dynamic> toJson() => {
    'currentData':currentData?.toJson(),
    'yesterDayData':yesterDayData?.toJson(),
    'lastWeekData':lastWeekData?.toJson(),
    'lastMonthData':lastMonthData?.toJson()
  };
}

/*
平台详情数据 环比
currentData.betPayoutAmount/yesterDayData.betPayoutAmount*100
currentData.betPayoutAmount/lastWeekData.betPayoutAmount*100
currentData.betPayoutAmount/lastMonthData.betPayoutAmount*100
增减率
( (currentData.betPayoutAmount-yesterDayData.betPayoutAmount)/yesterDayData.betPayoutAmount *100 +
(currentData.betPayoutAmount-lastWeekData.betPayoutAmount)/lastWeekData.betPayoutAmount *100+
(currentData.betPayoutAmount-lastMonthData.betPayoutAmount)/lastMonthData.betPayoutAmount *100 )/3
* */
//计算数据
class DetailAnalyzeRes {
  final DetailDataEntity curData;
  final DetailDataEntity yestodayData;
  final DetailDataEntity lastWeekData;
  final DetailDataEntity lastMonthData;
  const DetailAnalyzeRes({this.curData, this.yestodayData,this.lastWeekData,this.lastMonthData});
  //存款差额（毛利）profitAmount
  List<double> get profitAmount  => [curData.profitAmount,
    yestodayData.profitAmount == 0 ? 0:curData.profitAmount/yestodayData.profitAmount, //日环比
    lastWeekData.profitAmount == 0 ? 0:curData.profitAmount/lastWeekData.profitAmount, //周环比
    lastMonthData.profitAmount == 0 ? 0:curData.profitAmount/lastMonthData.profitAmount, //月环比
    (yestodayData.profitAmount == 0 || lastWeekData.profitAmount == 0 || lastMonthData.profitAmount == 0)? 0:
    ((curData.profitAmount-yestodayData.profitAmount)/yestodayData.profitAmount *100 +
        (curData.profitAmount-lastWeekData.profitAmount)/lastWeekData.profitAmount *100+
        (curData.profitAmount-lastMonthData.profitAmount)/lastMonthData.profitAmount *100 )/3//增减率
  ];
  //存款总额 totalDepositAmount
  List<double> get totalDepositAmount  => [curData.totalDepositAmount,
    yestodayData.totalDepositAmount == 0?0:curData.totalDepositAmount/yestodayData.totalDepositAmount, //日环比
    lastWeekData.totalDepositAmount == 0?0: curData.totalDepositAmount/lastWeekData.totalDepositAmount, //周环比
    lastMonthData.totalDepositAmount==0?0: curData.totalDepositAmount/lastMonthData.totalDepositAmount, //月环比
    (yestodayData.totalDepositAmount == 0 || lastWeekData.totalDepositAmount == 0 || lastMonthData.totalDepositAmount==0)?0:
    ((curData.totalDepositAmount-yestodayData.totalDepositAmount)/yestodayData.totalDepositAmount *100 +
        (curData.totalDepositAmount-lastWeekData.totalDepositAmount)/lastWeekData.totalDepositAmount *100+
        (curData.totalDepositAmount-lastMonthData.totalDepositAmount)/lastMonthData.totalDepositAmount *100 )/3//增减率
  ];
  //提款总额 totalAtmAmount
  List<double> get totalAtmAmount  => [curData.totalAtmAmount,
    yestodayData.totalAtmAmount == 0?0: curData.totalAtmAmount/yestodayData.totalAtmAmount, //日环比
    lastWeekData.totalAtmAmount == 0?0: curData.totalAtmAmount/lastWeekData.totalAtmAmount, //周环比
    lastMonthData.totalAtmAmount==0?0:curData.totalAtmAmount/lastMonthData.totalAtmAmount, //月环比
    yestodayData.totalAtmAmount == 0 || lastWeekData.totalAtmAmount == 0 || lastMonthData.totalAtmAmount==0 ?0:
    ((curData.totalAtmAmount-yestodayData.totalAtmAmount)/yestodayData.totalAtmAmount *100 +
        (curData.totalAtmAmount-lastWeekData.totalAtmAmount)/lastWeekData.totalAtmAmount *100+
        (curData.totalAtmAmount-lastMonthData.totalAtmAmount)/lastMonthData.totalAtmAmount *100 )/3//增减率
  ];
  //存款人数 totalDepositCount
  List<double> get totalDepositCount  => [curData.totalDepositCount,
    yestodayData.totalDepositCount==0?0:curData.totalDepositCount/yestodayData.totalDepositCount, //日环比
    lastWeekData.totalDepositCount==0?0:curData.totalDepositCount/lastWeekData.totalDepositCount, //周环比
    lastMonthData.totalDepositCount==0?0:curData.totalDepositCount/lastMonthData.totalDepositCount, //月环比
    (yestodayData.totalDepositCount==0 || lastWeekData.totalDepositCount==0 || lastMonthData.totalDepositCount==0)?0:
    ((curData.totalDepositCount-yestodayData.totalDepositCount)/yestodayData.totalDepositCount *100 +
        (curData.totalDepositCount-lastWeekData.totalDepositCount)/lastWeekData.totalDepositCount *100+
        (curData.totalDepositCount-lastMonthData.totalDepositCount)/lastMonthData.totalDepositCount *100 )/3//增减率
  ];
  //注册人数 totalRegistCount
  List<double> get totalRegistCount  => [curData.totalRegistCount,
    yestodayData.totalRegistCount==0?0:curData.totalRegistCount/yestodayData.totalRegistCount, //日环比
    lastWeekData.totalRegistCount==0?0:curData.totalRegistCount/lastWeekData.totalRegistCount, //周环比
    lastMonthData.totalRegistCount==0?0:curData.totalRegistCount/lastMonthData.totalRegistCount, //月环比
    (yestodayData.totalRegistCount==0||lastWeekData.totalRegistCount==0||lastMonthData.totalRegistCount==0)?0:
    ((curData.totalRegistCount-yestodayData.totalRegistCount)/yestodayData.totalRegistCount *100 +
        (curData.totalRegistCount-lastWeekData.totalRegistCount)/lastWeekData.totalRegistCount *100+
        (curData.totalRegistCount-lastMonthData.totalRegistCount)/lastMonthData.totalRegistCount *100 )/3//增减率
  ];
  //首存人数 depositFirstCount
  List<double> get depositFirstCount  => [curData.depositFirstCount,
    yestodayData.depositFirstCount==0?0:curData.depositFirstCount/yestodayData.depositFirstCount, //日环比
    lastWeekData.depositFirstCount==0?0:curData.depositFirstCount/lastWeekData.depositFirstCount, //周环比
    lastMonthData.depositFirstCount==0?0:curData.depositFirstCount/lastMonthData.depositFirstCount, //月环比
    (yestodayData.depositFirstCount==0||lastWeekData.depositFirstCount==0||lastMonthData.depositFirstCount==0)?0:
    ((curData.depositFirstCount-yestodayData.depositFirstCount)/yestodayData.depositFirstCount *100 +
        (curData.depositFirstCount-lastWeekData.depositFirstCount)/lastWeekData.depositFirstCount *100+
        (curData.depositFirstCount-lastMonthData.depositFirstCount)/lastMonthData.depositFirstCount *100 )/3//增减率
  ];
  //提款人数 atmCount
  List<double> get atmCount  => [curData.atmCount,
    yestodayData.atmCount==0?0:curData.atmCount/yestodayData.atmCount, //日环比
    lastWeekData.atmCount==0?0:curData.atmCount/lastWeekData.atmCount, //周环比
    lastMonthData.atmCount==0?0:curData.atmCount/lastMonthData.atmCount, //月环比
    (yestodayData.atmCount==0||lastWeekData.atmCount==0||lastMonthData.atmCount==0)?0:
    ((curData.atmCount-yestodayData.atmCount)/yestodayData.atmCount *100 +
        (curData.atmCount-lastWeekData.atmCount)/lastWeekData.atmCount *100+
        (curData.atmCount-lastMonthData.atmCount)/lastMonthData.atmCount *100 )/3//增减率
  ];
  //首存总额 depositFirstAmount
  List<double> get depositFirstAmount  => [curData.depositFirstAmount,
    yestodayData.depositFirstAmount==0?0:curData.depositFirstAmount/yestodayData.depositFirstAmount, //日环比
    lastWeekData.depositFirstAmount==0?0:curData.depositFirstAmount/lastWeekData.depositFirstAmount, //周环比
    lastMonthData.depositFirstAmount==0?0:curData.depositFirstAmount/lastMonthData.depositFirstAmount, //月环比
    (yestodayData.depositFirstAmount==0||lastWeekData.depositFirstAmount==0||lastMonthData.depositFirstAmount==0)?0:
    ((curData.depositFirstAmount-yestodayData.depositFirstAmount)/yestodayData.depositFirstAmount *100 +
        (curData.depositFirstAmount-lastWeekData.depositFirstAmount)/lastWeekData.depositFirstAmount *100+
        (curData.depositFirstAmount-lastMonthData.depositFirstAmount)/lastMonthData.depositFirstAmount *100 )/3//增减率
  ];
  //次存人数 depositSecondCount
  List<double> get depositSecondCount  => [curData.depositSecondCount,
    yestodayData.depositSecondCount==0?0:curData.depositSecondCount/yestodayData.depositSecondCount, //日环比
    lastWeekData.depositSecondCount==0?0:curData.depositSecondCount/lastWeekData.depositSecondCount, //周环比
    lastMonthData.depositSecondCount==0?0:curData.depositSecondCount/lastMonthData.depositSecondCount, //月环比
    (yestodayData.depositSecondCount==0||lastWeekData.depositSecondCount==0||lastMonthData.depositSecondCount==0)?0:
    ((curData.depositSecondCount-yestodayData.depositSecondCount)/yestodayData.depositSecondCount *100 +
        (curData.depositSecondCount-lastWeekData.depositSecondCount)/lastWeekData.depositSecondCount *100+
        (curData.depositSecondCount-lastMonthData.depositSecondCount)/lastMonthData.depositSecondCount *100 )/3//增减率
  ];
  //次存总额 depositSecondAmount
  List<double> get depositSecondAmount  => [curData.depositSecondAmount,
    yestodayData.depositSecondAmount==0?0:curData.depositSecondAmount/yestodayData.depositSecondAmount, //日环比
    lastWeekData.depositSecondAmount==0?0:curData.depositSecondAmount/lastWeekData.depositSecondAmount, //周环比
    lastMonthData.depositSecondAmount==0?0:curData.depositSecondAmount/lastMonthData.depositSecondAmount, //月环比
    (yestodayData.depositSecondAmount==0||lastWeekData.depositSecondAmount==0||lastMonthData.depositSecondAmount==0)?0:
    ((curData.depositSecondAmount-yestodayData.depositSecondAmount)/yestodayData.depositSecondAmount *100 +
        (curData.depositSecondAmount-lastWeekData.depositSecondAmount)/lastWeekData.depositSecondAmount *100+
        (curData.depositSecondAmount-lastMonthData.depositSecondAmount)/lastMonthData.depositSecondAmount *100 )/3//增减率
  ];
  //快入人数 depositQuickCount
  List<double> get depositQuickCount  => [curData.depositQuickCount,
    yestodayData.depositQuickCount==0?0:curData.depositQuickCount/yestodayData.depositQuickCount, //日环比
    lastWeekData.depositQuickCount==0?0:curData.depositQuickCount/lastWeekData.depositQuickCount, //周环比
    lastMonthData.depositQuickCount==0?0:curData.depositQuickCount/lastMonthData.depositQuickCount, //月环比
    (yestodayData.depositQuickCount==0||lastWeekData.depositQuickCount==0||lastMonthData.depositQuickCount==0)?0:
    ((curData.depositQuickCount-yestodayData.depositQuickCount)/yestodayData.depositQuickCount *100 +
        (curData.depositQuickCount-lastWeekData.depositQuickCount)/lastWeekData.depositQuickCount *100+
        (curData.depositQuickCount-lastMonthData.depositQuickCount)/lastMonthData.depositQuickCount *100 )/3//增减率
  ];
  //在支人数 depositOnlineCount
  List<double> get depositOnlineCount  => [curData.depositOnlineCount,
    yestodayData.depositOnlineCount==0?0:curData.depositOnlineCount/yestodayData.depositOnlineCount, //日环比
    lastWeekData.depositOnlineCount==0?0:curData.depositOnlineCount/lastWeekData.depositOnlineCount, //周环比
    lastMonthData.depositOnlineCount==0?0:curData.depositOnlineCount/lastMonthData.depositOnlineCount, //月环比
    (yestodayData.depositOnlineCount==0||lastWeekData.depositOnlineCount==0||lastMonthData.depositOnlineCount==0)?0:
    ((curData.depositOnlineCount-yestodayData.depositOnlineCount)/yestodayData.depositOnlineCount *100 +
        (curData.depositOnlineCount-lastWeekData.depositOnlineCount)/lastWeekData.depositOnlineCount *100+
        (curData.depositOnlineCount-lastMonthData.depositOnlineCount)/lastMonthData.depositOnlineCount *100 )/3//增减率
  ];
  //PC人数  depositPcCount
  List<double> get depositPcCount  => [curData.depositPcCount,
    yestodayData.depositPcCount==0?0:curData.depositPcCount/yestodayData.depositPcCount, //日环比
    lastWeekData.depositPcCount==0?0:curData.depositPcCount/lastWeekData.depositPcCount, //周环比
    lastMonthData.depositPcCount==0?0:curData.depositPcCount/lastMonthData.depositPcCount, //月环比
    (yestodayData.depositPcCount==0||lastWeekData.depositPcCount==0||lastMonthData.depositPcCount==0)?0:
    ((curData.depositPcCount-yestodayData.depositPcCount)/yestodayData.depositPcCount *100 +
        (curData.depositPcCount-lastWeekData.depositPcCount)/lastWeekData.depositPcCount *100+
        (curData.depositPcCount-lastMonthData.depositPcCount)/lastMonthData.depositPcCount *100 )/3//增减率
  ];
  //H5人数 depositWapCount
  List<double> get depositWapCount  => [curData.depositWapCount,
    yestodayData.depositWapCount==0?0:curData.depositWapCount/yestodayData.depositWapCount, //日环比
    lastWeekData.depositWapCount==0?0:curData.depositWapCount/lastWeekData.depositWapCount, //周环比
    lastMonthData.depositWapCount==0?0:curData.depositWapCount/lastMonthData.depositWapCount, //月环比
    (yestodayData.depositWapCount==0||lastWeekData.depositWapCount==0||lastMonthData.depositWapCount==0)?0:
    ((curData.depositWapCount-yestodayData.depositWapCount)/yestodayData.depositWapCount *100 +
        (curData.depositWapCount-lastWeekData.depositWapCount)/lastWeekData.depositWapCount *100+
        (curData.depositWapCount-lastMonthData.depositWapCount)/lastMonthData.depositWapCount *100 )/3//增减率
  ];
  //App人数 depositAppCount
  List<double> get depositAppCount  => [curData.depositAppCount,
    yestodayData.depositAppCount==0?0:curData.depositAppCount/yestodayData.depositAppCount, //日环比
    lastWeekData.depositAppCount==0?0:curData.depositAppCount/lastWeekData.depositAppCount, //周环比
    lastMonthData.depositAppCount==0?0:curData.depositAppCount/lastMonthData.depositAppCount, //月环比
    (yestodayData.depositAppCount==0||lastWeekData.depositAppCount==0||lastMonthData.depositAppCount==0)?0:
    ((curData.depositAppCount-yestodayData.depositAppCount)/yestodayData.depositAppCount *100 +
        (curData.depositAppCount-lastWeekData.depositAppCount)/lastWeekData.depositAppCount *100+
        (curData.depositAppCount-lastMonthData.depositAppCount)/lastMonthData.depositAppCount *100 )/3//增减率
  ];
  //注单人数 betCount
  List<double> get betCount  => [curData.betCount,
    yestodayData.betCount==0?0:curData.betCount/yestodayData.betCount, //日环比
    lastWeekData.betCount==0?0:curData.betCount/lastWeekData.betCount, //周环比
    lastMonthData.betCount==0?0:curData.betCount/lastMonthData.betCount, //月环比
    (yestodayData.betCount==0||lastWeekData.betCount==0||lastMonthData.betCount==0)?0:
    ((curData.betCount-yestodayData.betCount)/yestodayData.betCount *100 +
        (curData.betCount-lastWeekData.betCount)/lastWeekData.betCount *100+
        (curData.betCount-lastMonthData.betCount)/lastMonthData.betCount *100 )/3//增减率
  ];
  //有效投注 betValidAmount
  List<double> get betValidAmount  => [curData.betValidAmount,
    yestodayData.betValidAmount==0?0:curData.betValidAmount/yestodayData.betValidAmount, //日环比
    lastWeekData.betValidAmount==0?0:curData.betValidAmount/lastWeekData.betValidAmount, //周环比
    lastMonthData.betValidAmount==0?0:curData.betValidAmount/lastMonthData.betValidAmount, //月环比
    (yestodayData.betValidAmount==0||lastWeekData.betValidAmount==0||lastMonthData.betValidAmount==0)?0:
    ((curData.betValidAmount-yestodayData.betValidAmount)/yestodayData.betValidAmount *100 +
        (curData.betValidAmount-lastWeekData.betValidAmount)/lastWeekData.betValidAmount *100+
        (curData.betValidAmount-lastMonthData.betValidAmount)/lastMonthData.betValidAmount *100 )/3//增减率
  ];
  //派彩输赢 betPayoutAmount
  List<double> get betPayoutAmount  => [curData.betPayoutAmount,
    yestodayData.betPayoutAmount==0?0:curData.betPayoutAmount/yestodayData.betPayoutAmount, //日环比
    lastWeekData.betPayoutAmount==0?0:curData.betPayoutAmount/lastWeekData.betPayoutAmount, //周环比
    lastMonthData.betPayoutAmount==0?0:curData.betPayoutAmount/lastMonthData.betPayoutAmount, //月环比
    (yestodayData.betPayoutAmount==0||lastWeekData.betPayoutAmount==0||lastMonthData.betPayoutAmount==0)?0:
    ((curData.betPayoutAmount-yestodayData.betPayoutAmount)/yestodayData.betPayoutAmount *100 +
        (curData.betPayoutAmount-lastWeekData.betPayoutAmount)/lastWeekData.betPayoutAmount *100+
        (curData.betPayoutAmount-lastMonthData.betPayoutAmount)/lastMonthData.betPayoutAmount *100 )/3//增减率
  ];
  //新客存款总额 newClientTotalDeposit
  List<double> get newClientTotalDeposit  => [curData.newClientTotalDeposit,
  yestodayData.newClientTotalDeposit==0?0:curData.newClientTotalDeposit/yestodayData.newClientTotalDeposit, //日环比
  lastWeekData.newClientTotalDeposit==0?0:curData.newClientTotalDeposit/lastWeekData.newClientTotalDeposit, //周环比
  lastMonthData.newClientTotalDeposit==0?0:curData.newClientTotalDeposit/lastMonthData.newClientTotalDeposit, //月环比
  (yestodayData.newClientTotalDeposit==0||lastWeekData.newClientTotalDeposit==0||lastMonthData.newClientTotalDeposit==0)?0:
  ((curData.newClientTotalDeposit-yestodayData.newClientTotalDeposit)/yestodayData.newClientTotalDeposit *100 +
      (curData.newClientTotalDeposit-lastWeekData.newClientTotalDeposit)/lastWeekData.newClientTotalDeposit *100+
      (curData.newClientTotalDeposit-lastMonthData.newClientTotalDeposit)/lastMonthData.newClientTotalDeposit *100 )/3//增减率
  ];

  //新客提款总额 newClientTotalAtm
  List<double> get newClientTotalAtm  => [curData.newClientTotalAtm,
  yestodayData.newClientTotalAtm==0?0:curData.newClientTotalAtm/yestodayData.newClientTotalAtm, //日环比
  lastWeekData.newClientTotalAtm==0?0:curData.newClientTotalAtm/lastWeekData.newClientTotalAtm, //周环比
  lastMonthData.newClientTotalAtm==0?0:curData.newClientTotalAtm/lastMonthData.newClientTotalAtm, //月环比
  (yestodayData.newClientTotalAtm==0||lastWeekData.newClientTotalAtm==0||lastMonthData.newClientTotalAtm==0)?0:
  ((curData.newClientTotalAtm-yestodayData.newClientTotalAtm)/yestodayData.newClientTotalAtm *100 +
      (curData.newClientTotalAtm-lastWeekData.newClientTotalAtm)/lastWeekData.newClientTotalAtm *100+
      (curData.newClientTotalAtm-lastMonthData.newClientTotalAtm)/lastMonthData.newClientTotalAtm *100 )/3//增减率
  ];
  //新客有效投注额 newClientBetValidAmount
  List<double> get newClientBetValidAmount  => [curData.newClientBetValidAmount,
  yestodayData.newClientBetValidAmount==0?0:curData.newClientBetValidAmount/yestodayData.newClientBetValidAmount, //日环比
  lastWeekData.newClientBetValidAmount==0?0:curData.newClientBetValidAmount/lastWeekData.newClientBetValidAmount, //周环比
  lastMonthData.newClientBetValidAmount==0?0:curData.newClientBetValidAmount/lastMonthData.newClientBetValidAmount, //月环比
  (yestodayData.newClientBetValidAmount==0||lastWeekData.newClientBetValidAmount==0||lastMonthData.newClientBetValidAmount==0)?0:
  ((curData.newClientBetValidAmount-yestodayData.newClientBetValidAmount)/yestodayData.newClientBetValidAmount *100 +
      (curData.newClientBetValidAmount-lastWeekData.newClientBetValidAmount)/lastWeekData.newClientBetValidAmount *100+
      (curData.newClientBetValidAmount-lastMonthData.newClientBetValidAmount)/lastMonthData.newClientBetValidAmount *100 )/3//增减率
  ];
  //新客人数 newClientCount
  List<double> get newClientCount  => [curData.newClientCount,
  yestodayData.newClientCount==0?0:curData.newClientCount/yestodayData.newClientCount, //日环比
  lastWeekData.newClientCount==0?0:curData.newClientCount/lastWeekData.newClientCount, //周环比
  lastMonthData.newClientCount==0?0:curData.newClientCount/lastMonthData.newClientCount, //月环比
  (yestodayData.newClientCount==0||lastWeekData.newClientCount==0||lastMonthData.newClientCount==0)?0:
  ((curData.newClientCount-yestodayData.newClientCount)/yestodayData.newClientCount *100 +
      (curData.newClientCount-lastWeekData.newClientCount)/lastWeekData.newClientCount *100+
      (curData.newClientCount-lastMonthData.newClientCount)/lastMonthData.newClientCount *100 )/3//增减率
  ];
}

class DetailDataEntity {
  double atmCount; //取款人数
  String beginTime;
  double betCount;
  double betPayoutAmount; //派彩金额
  double betValidAmount;
  double betValidAmountByMonth;
  double dataCount;
  double depositAppCount;
  double depositFirstAmount;
  double depositFirstCount;
  double depositOnlineCount;
  double depositOnlineNumber;
  double depositPcCount;
  double depositQuickCount;
  double depositQuickNumber;
  double depositSecondAmount;
  double depositSecondCount;
  double depositWapCount;
  String domain;
  double profitAmount;
  double profitAmountByMonth;
  double totalAtmAmount;
  double totalDepositAmount;
  double totalDepositCount;
  double totalRegistCount;
  double newClientTotalDeposit;
  double newClientTotalAtm;
  double newClientBetValidAmount;
  double newClientCount;
  DetailDataEntity({
    this.atmCount,
    this.beginTime,
    this.betCount,
    this.betPayoutAmount,
    this.betValidAmount,
    this.betValidAmountByMonth,
    this.dataCount,
    this.depositAppCount,
    this.depositFirstAmount,
    this.depositFirstCount,
    this.depositOnlineCount,
    this.depositOnlineNumber,
    this.depositPcCount,
    this.depositQuickCount,
    this.depositQuickNumber,
    this.depositSecondAmount,
    this.depositSecondCount,
    this.depositWapCount,
    this.domain,
    this.profitAmount,
    this.profitAmountByMonth,
    this.totalAtmAmount,
    this.totalDepositAmount,
    this.totalDepositCount,
    this.totalRegistCount,
    this.newClientTotalDeposit,
    this.newClientTotalAtm,
    this.newClientBetValidAmount,
    this.newClientCount
  });

  DetailDataEntity.fromJson(Map < String, dynamic > json):
        atmCount=json['atmCount'].toDouble(),
        beginTime=json['beginTime'],
        betCount=json['betCount'].toDouble(),
        betPayoutAmount=json['betPayoutAmount'],
        betValidAmount=json['betValidAmount'],
        betValidAmountByMonth=json['betValidAmountByMonth'].toDouble(),
        dataCount=json['dataCount'].toDouble(),
        depositAppCount=json['depositAppCount'].toDouble(),
        depositFirstAmount=json['depositFirstAmount'],
        depositFirstCount=json['depositFirstCount'].toDouble(),
        depositOnlineCount=json['depositOnlineCount'].toDouble(),
        depositOnlineNumber=json['depositOnlineNumber'].toDouble(),
        depositPcCount=json['depositPcCount'].toDouble(),
        depositQuickCount=json['depositQuickCount'].toDouble(),
        depositQuickNumber=json['depositQuickNumber'].toDouble(),
        depositSecondAmount=json['depositSecondAmount'],
        depositSecondCount=json['depositSecondCount'].toDouble(),
        depositWapCount=json['depositWapCount'].toDouble(),
        domain=json['domain'],
        profitAmount=json['profitAmount'].toDouble(),
        profitAmountByMonth=json['profitAmountByMonth'].toDouble(),
        totalAtmAmount=json['totalAtmAmount'].toDouble(),
        totalDepositAmount=json['totalDepositAmount'].toDouble(),
        totalDepositCount=json['totalDepositCount'].toDouble(),
        newClientTotalDeposit=json['newClientTotalDeposit'].toDouble(),
        newClientTotalAtm=json['newClientTotalAtm'].toDouble(),
        newClientBetValidAmount=json['newClientBetValidAmount'].toDouble(),
        newClientCount=json['newClientCount'].toDouble(),
        totalRegistCount=json['totalRegistCount'].toDouble();
  Map <String, dynamic> toJson() => {
    'atmCount':atmCount,
    'beginTime':beginTime,
    'betCount':betCount,
    'betPayoutAmount':betPayoutAmount,
    'betValidAmount':betValidAmount,
    'betValidAmountByMonth':betValidAmountByMonth,
    'dataCount':dataCount,
    'depositAppCount':depositAppCount,
    'depositFirstAmount':depositFirstAmount,
    'depositFirstCount':depositFirstCount,
    'depositOnlineCount':depositOnlineCount,
    'depositOnlineNumber':depositOnlineNumber,
    'depositPcCount':depositPcCount,
    'depositQuickCount':depositQuickCount,
    'depositQuickNumber':depositQuickNumber,
    'depositSecondAmount':depositSecondAmount,
    'depositSecondCount':depositSecondCount,
    'depositWapCount':depositWapCount,
    'domain':domain,
    'profitAmount':profitAmount,
    'profitAmountByMonth':profitAmountByMonth,
    'totalAtmAmount':totalAtmAmount,
    'totalDepositAmount':totalDepositAmount,
    'totalDepositCount':totalDepositCount,
    'totalRegistCount':totalRegistCount,
    'newClientTotalDeposit':newClientTotalDeposit,
    'newClientTotalAtm':newClientTotalAtm,
    'newClientBetValidAmount':newClientBetValidAmount,
    'newClientCount':newClientCount
  };
}